<?php //debug($paralelos); ?>
	<div class="row-fluid">
		<div class="span12">
            <div class="span6">
    
						<div class="alert alert-block alert-error fade in">
							<a href="#" data-dismiss="alert" class="close">x</a>
							<h4 class="alert-heading">
								Registro de Gestiones
							</h4>
							<ul>
								<li>
									Registra la Gestion.
								</li>
								<li>
									Registrar Ciclos de la Gestion.
								</li>
                                <li>
									Registro de Turnos de la Gestion.
								</li>
                                <li>
									Registro de Periodos por Turno.
								</li>
							</ul>
							<p>
								<a href="<?php echo $this->Html->url(array('action'=>'insertar')) ?>" class="btn btn-inverse"><i class="splashy-check"></i> Registrar Gestion</a>
							</p>
						</div>
    </div>
            <div class="span4">
					<div id="cargaDatos">
					</div>
					<div class="alert alert-block alert-warning fade in">
						<h4 class="alert-heading">
							Registro de Nuevos Ciclos.
						</h4>
						<p>
							Registrar nuevo ciclo 
						</p>
						<p>
						<a href="<?php //echo $this->Html->url(array('controller'=>'Ciclos', 'action'=>'insertar'))?>" class="btn btn-inverse">Registrar nuevo Ciclo</a>
						</p>
					</div>
				</div>
                <div class="span10">
			<h3 class="heading">
				Gestiones
			</h3>
			<table class="table table-striped table-bordered dTableR" id="dt_a">
				<thead>
					<tr>
						<th>Nombre</th>
						<th>Estado</th>
                        <th>Promedio maximo</th>
                        <th>Promedio minimo</th>
						<th>Acciones</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach ($gestiones as $gest): ?>
						<?php $idGest=$gest[ 'Gestione'][ 'id']; ?>
							<tr>
								<td>
									<?php echo $gest[ 'Gestione'][ 'nombre']; ?>
								</td>
								<td>
									<?php if($gest[ 'Gestione'][ 'estado']): ?>
                                    Habilitado
                                    <?php else: ?>
                                    Deshabilitado
                                    <?php endif;?>
								</td>
                                <td>
                                <?php echo $gest['Gestione']['promedio'] ?>
                                </td>
								<td>
                                <?php echo $gest['Gestione']['promedioaprobacion'] ?>
                                </td>
                                <td>
                                 <?php 
                                echo $this->Html->image("iconos/edit.png", array(
                                    "title" => "Editar",
                                    'url' => array('action' => 'editar', $gest['Gestione']['id'])
                                ));
                            ?> 
                            <?php 
                                echo $this->Html->image("iconos/elim.png", array(
                                    "title" => "Editar",
                                    'url' => array('action' => 'eliminar', $gest['Gestione']['id']),
                                    
                                ));
                            ?> 
                            <?php //echo $this->Html->link($this->Html->image("iconos/elim.png"), array('action'=>'eliminar',$gest['Gestione']['id']),null,('Desea aliminar esta Gestion.....!!!!!?')); ?>
								</td>
							</tr>
							<?php endforeach; ?>
				</tbody>
			</table>
		</div>
	</div>
	<!-- fin sidebar -->
    <!-- sidebar -->
    <?php echo $this->element('sidebar/gestiones'); ?>
    <!-- fin sidebar -->
	<?php echo $this->element('jstablas'); ?>
